﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Admin.Core.Service.sys.Org.Dto/SysOrgDto 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       SysOrgDto
* 创建时间：  2025/6/4 11:07:04
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using SSPivot.Admin.Core.Service.Dto;
using SSPivot.Admin.Core.Service.sys.Role.Dto;
using SSPivot.Admin.Core.Service.sys.User.Dto;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Admin.Core.Service.sys.Org.Dto
{
    public class SysOrgDto : BaseTreeDto<SysOrgDto>
    {
        public long? Id { get; set; }
        public long? TenantId { get; set; }
        /// <summary>
        /// 父级
        /// </summary>
        public long ParentId { get; set; }

        public string? ParentName { get; set; }

        public List<long>? ParentIds { get; set; }

        public List<string>? ParentNames { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [StringLength(50)]
        public string? Name { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        [StringLength(50)]
        public string? Code { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        [StringLength(50)]
        public string? Value { get; set; }

        /// <summary>
        /// 成员数
        /// </summary>
        public int MemberCount { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; } = true;

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [StringLength(500)]
        public string? Description { get; set; }

 
        /// <summary>
        /// 用户列表
        /// </summary>

        public List<SysUserDto>? Users { get; set; }

        /// <summary>
        /// 角色列表
        /// </summary>

        public List<SysRoleDto>? Roles { get; set; }

        /// <summary>
        /// 子级列表
        /// </summary>                 
        public List<SysOrgDto>? Children { get; set; }
    }
    public class SysOrgListDto
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 父级
        /// </summary>
        public long ParentId { get; set; }

        public string? ParentName { get; set; }

        public List<long>? ParentIds { get; set; }

        public List<string>? ParentNames { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }
    }
    public class QuerySysOrgRequest
    {
        public string? Key { get; set; }
        public long? ParentId { get; set; }
        public bool ContainSelf { get; set; }
        public DateTime? SDate { get; set; }
        public DateTime? EDate { get; set; }
    }
}
